/
AvailableSettings.java
1800 lines (1572 loc) · 69.1 KB
/
AvailableSettings.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.cfg;
import java.util.function.Supplier;
import org.hibernate.HibernateException;
import org.hibernate.boot.MetadataBuilder;
import org.hibernate.boot.registry.classloading.internal.TcclLookupPrecedence;
import org.hibernate.query.ImmutableEntityUpdateQueryHandlingMode;
import org.hibernate.query.internal.ParameterMetadataImpl;
import org.hibernate.resource.transaction.spi.TransactionCoordinator;
import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder;
import org.hibernate.tool.schema.JdbcMetadaAccessStrategy;
import org.hibernate.tool.schema.SourceType;
/**
* @author Steve Ebersole
*/
public interface AvailableSettings {
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// JPA defined settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* The name of the {@link javax.persistence.spi.PersistenceProvider} implementor
* <p/>
* See JPA 2 sections 9.4.3 and 8.2.1.4
*/
String JPA_PERSISTENCE_PROVIDER = "javax.persistence.provider";
/**
* The type of transactions supported by the entity managers.
* <p/>
* See JPA 2 sections 9.4.3 and 8.2.1.2
*/
String JPA_TRANSACTION_TYPE = "javax.persistence.transactionType";
/**
* The JNDI name of a JTA {@link javax.sql.DataSource}.
* <p/>
* See JPA 2 sections 9.4.3 and 8.2.1.5
*/
String JPA_JTA_DATASOURCE = "javax.persistence.jtaDataSource";
/**
* The JNDI name of a non-JTA {@link javax.sql.DataSource}.
* <p/>
* See JPA 2 sections 9.4.3 and 8.2.1.5
*/
String JPA_NON_JTA_DATASOURCE = "javax.persistence.nonJtaDataSource";
/**
* The name of a JDBC driver to use to connect to the database.
* <p/>
* Used in conjunction with {@link #JPA_JDBC_URL}, {@link #JPA_JDBC_USER} and {@link #JPA_JDBC_PASSWORD}
* to define how to make connections to the database in lieu of
* a datasource (either {@link #JPA_JTA_DATASOURCE} or {@link #JPA_NON_JTA_DATASOURCE}).
* <p/>
* See section 8.2.1.9
*/
String JPA_JDBC_DRIVER = "javax.persistence.jdbc.driver";
/**
* The JDBC connection url to use to connect to the database.
* <p/>
* Used in conjunction with {@link #JPA_JDBC_DRIVER}, {@link #JPA_JDBC_USER} and {@link #JPA_JDBC_PASSWORD}
* to define how to make connections to the database in lieu of
* a datasource (either {@link #JPA_JTA_DATASOURCE} or {@link #JPA_NON_JTA_DATASOURCE}).
* <p/>
* See section 8.2.1.9
*/
String JPA_JDBC_URL = "javax.persistence.jdbc.url";
/**
* The JDBC connection user name.
* <p/>
* Used in conjunction with {@link #JPA_JDBC_DRIVER}, {@link #JPA_JDBC_URL} and {@link #JPA_JDBC_PASSWORD}
* to define how to make connections to the database in lieu of
* a datasource (either {@link #JPA_JTA_DATASOURCE} or {@link #JPA_NON_JTA_DATASOURCE}).
* <p/>
* See section 8.2.1.9
*/
String JPA_JDBC_USER = "javax.persistence.jdbc.user";
/**
* The JDBC connection password.
* <p/>
* Used in conjunction with {@link #JPA_JDBC_DRIVER}, {@link #JPA_JDBC_URL} and {@link #JPA_JDBC_USER}
* to define how to make connections to the database in lieu of
* a datasource (either {@link #JPA_JTA_DATASOURCE} or {@link #JPA_NON_JTA_DATASOURCE}).
* <p/>
* See JPA 2 section 8.2.1.9
*/
String JPA_JDBC_PASSWORD = "javax.persistence.jdbc.password";
/**
* Used to indicate whether second-level (what JPA terms shared cache) caching is
* enabled as per the rules defined in JPA 2 section 3.1.7.
* <p/>
* See JPA 2 sections 9.4.3 and 8.2.1.7
* @see javax.persistence.SharedCacheMode
*/
String JPA_SHARED_CACHE_MODE = "javax.persistence.sharedCache.mode";
/**
* NOTE : Not a valid EMF property...
* <p/>
* Used to indicate if the provider should attempt to retrieve requested data
* in the shared cache.
*
* @see javax.persistence.CacheRetrieveMode
*/
String JPA_SHARED_CACHE_RETRIEVE_MODE ="javax.persistence.cache.retrieveMode";
/**
* NOTE : Not a valid EMF property...
* <p/>
* Used to indicate if the provider should attempt to store data loaded from the database
* in the shared cache.
*
* @see javax.persistence.CacheStoreMode
*/
String JPA_SHARED_CACHE_STORE_MODE ="javax.persistence.cache.storeMode";
/**
* Used to indicate what form of automatic validation is in effect as per rules defined
* in JPA 2 section 3.6.1.1
* <p/>
* See JPA 2 sections 9.4.3 and 8.2.1.8
* @see javax.persistence.ValidationMode
*/
String JPA_VALIDATION_MODE = "javax.persistence.validation.mode";
/**
* Used to pass along any discovered validator factory.
*/
String JPA_VALIDATION_FACTORY = "javax.persistence.validation.factory";
/**
* Used to coordinate with bean validators
* <p/>
* See JPA 2 section 8.2.1.9
*/
String JPA_PERSIST_VALIDATION_GROUP = "javax.persistence.validation.group.pre-persist";
/**
* Used to coordinate with bean validators
* <p/>
* See JPA 2 section 8.2.1.9
*/
String JPA_UPDATE_VALIDATION_GROUP = "javax.persistence.validation.group.pre-update";
/**
* Used to coordinate with bean validators
* <p/>
* See JPA 2 section 8.2.1.9
*/
String JPA_REMOVE_VALIDATION_GROUP = "javax.persistence.validation.group.pre-remove";
/**
* Used to request (hint) a pessimistic lock scope.
* <p/>
* See JPA 2 sections 8.2.1.9 and 3.4.4.3
*/
String JPA_LOCK_SCOPE = "javax.persistence.lock.scope";
/**
* Used to request (hint) a pessimistic lock timeout (in milliseconds).
* <p/>
* See JPA 2 sections 8.2.1.9 and 3.4.4.3
*/
String JPA_LOCK_TIMEOUT = "javax.persistence.lock.timeout";
/**
* Used to pass along the CDI BeanManager, if any, to be used.
*
* According to JPA, strictly, the BeanManager should be passed in
* at boot-time and be ready for use at that time. However not all
* environments can do this (WildFly for one). To accommodate such
* environments, Hibernate provides an SPI via
* {@link org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager} that
* can be used to provide delayed BeanManager access. Long story
* short, this setting could be typed as BeanManager or as
* {@link org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager}.
*/
String CDI_BEAN_MANAGER = "javax.persistence.bean.manager";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// BootstrapServiceRegistry level settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* Used to define a {@link java.util.Collection} of the {@link ClassLoader} instances Hibernate should use for
* class-loading and resource-lookups.
*
* @since 5.0
*/
String CLASSLOADERS = "hibernate.classLoaders";
/**
* Used to define how the current thread context {@link ClassLoader} must be used
* for class lookup.
*
* @see TcclLookupPrecedence
*/
String TC_CLASSLOADER = "hibernate.classLoader.tccl_lookup_precedence";
/**
* Names the {@link ClassLoader} used to load user application classes.
* @since 4.0
*
* @deprecated Use {@link #CLASSLOADERS} instead
*/
@Deprecated
String APP_CLASSLOADER = "hibernate.classLoader.application";
/**
* Names the {@link ClassLoader} Hibernate should use to perform resource loading.
* @since 4.0
* @deprecated Use {@link #CLASSLOADERS} instead
*/
@Deprecated
String RESOURCES_CLASSLOADER = "hibernate.classLoader.resources";
/**
* Names the {@link ClassLoader} responsible for loading Hibernate classes. By default this is
* the {@link ClassLoader} that loaded this class.
* @since 4.0
* @deprecated Use {@link #CLASSLOADERS} instead
*/
@Deprecated
String HIBERNATE_CLASSLOADER = "hibernate.classLoader.hibernate";
/**
* Names the {@link ClassLoader} used when Hibernate is unable to locates classes on the
* {@link #APP_CLASSLOADER} or {@link #HIBERNATE_CLASSLOADER}.
* @since 4.0
* @deprecated Use {@link #CLASSLOADERS} instead
*/
@Deprecated
String ENVIRONMENT_CLASSLOADER = "hibernate.classLoader.environment";
/**
* @deprecated use {@link #JPA_METAMODEL_POPULATION} instead.
*/
@Deprecated
String JPA_METAMODEL_GENERATION = "hibernate.ejb.metamodel.generation";
/**
* Setting that indicates whether to build the JPA types. Accepts
* 3 values:<ul>
* <li>
* <b>enabled</b> - Do the build
* </li>
* <li>
* <b>disabled</b> - Do not so the build
* </li>
* <li>
* <b>ignoreUnsupported</b> - Do the build, but ignore any non-JPA features that would otherwise
* result in a failure.
* </li>
* </ul>
*
*
*/
@Deprecated
String JPA_METAMODEL_POPULATION = "hibernate.ejb.metamodel.population";
/**
* Setting that controls whether we seek out JPA "static metamodel" classes and populate them. Accepts
* 3 values:<ul>
* <li>
* <b>enabled</b> -Do the population
* </li>
* <li>
* <b>disabled</b> - Do not do the population
* </li>
* <li>
* <b>skipUnsupported</b> - Do the population, but ignore any non-JPA features that would otherwise
* result in the population failing.
* </li>
* </ul>
*/
String STATIC_METAMODEL_POPULATION = "hibernate.jpa.static_metamodel.population";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// StandardServiceRegistry level settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* Names the {@link org.hibernate.engine.jdbc.connections.spi.ConnectionProvider} to use for obtaining
* JDBC connections. Can reference:<ul>
* <li>an instance of ConnectionProvider</li>
* <li>a {@code Class<? extends ConnectionProvider>} reference</li>
* <li>a {@code Class<? extends ConnectionProvider>} FQN</li>
* </ul>
* <p/>
* The term {@code "class"} appears in the setting name due to legacy reasons; however it can accept instances.
*/
String CONNECTION_PROVIDER ="hibernate.connection.provider_class";
/**
* Names the {@literal JDBC} driver class
*/
String DRIVER ="hibernate.connection.driver_class";
/**
* Names the {@literal JDBC} connection url.
*/
String URL ="hibernate.connection.url";
/**
* Names the connection user. This might mean one of 2 things in out-of-the-box Hibernate
* {@link org.hibernate.engine.jdbc.connections.spi.ConnectionProvider}: <ul>
* <li>The username used to pass along to creating the JDBC connection</li>
* <li>The username used to obtain a JDBC connection from a data source</li>
* </ul>
*/
String USER ="hibernate.connection.username";
/**
* Names the connection password. See usage discussion on {@link #USER}
*/
String PASS ="hibernate.connection.password";
/**
* Names the {@literal JDBC} transaction isolation level
*/
String ISOLATION ="hibernate.connection.isolation";
/**
* Controls the autocommit mode of {@literal JDBC} Connections obtained
* from a non-DataSource ConnectionProvider - assuming the ConnectionProvider
* impl properly leverages this setting (the provided Hibernate impls all
* do).
*/
String AUTOCOMMIT = "hibernate.connection.autocommit";
/**
* Maximum number of inactive connections for the built-in Hibernate connection pool.
*/
String POOL_SIZE ="hibernate.connection.pool_size";
/**
* Names a {@link javax.sql.DataSource}. Can reference:<ul>
* <li>a {@link javax.sql.DataSource} instance</li>
* <li>a {@literal JNDI} name under which to locate the {@link javax.sql.DataSource}</li>
* </ul>
* For JNDI names, ses also {@link #JNDI_CLASS}, {@link #JNDI_URL}, {@link #JNDI_PREFIX}, etc.
*/
String DATASOURCE ="hibernate.connection.datasource";
/**
* Allows a user to tell Hibernate that the Connections we obtain from the configured
* ConnectionProvider will already have auto-commit disabled when we acquire them from
* the provider. When we get connections already in auto-commit, this allows us to circumvent
* some operations in the interest of performance.
* <p/>
* Default value is {@code false} - do not skip, aka call setAutocommit
*
* @since 5.2.10
*/
String CONNECTION_PROVIDER_DISABLES_AUTOCOMMIT= "hibernate.connection.provider_disables_autocommit";
/**
* Names a prefix used to define arbitrary JDBC connection properties. These properties are passed along to
* the {@literal JDBC} provider when creating a connection.
*/
String CONNECTION_PREFIX = "hibernate.connection";
/**
* Names the {@literal JNDI} {@link javax.naming.InitialContext} class.
*
* @see javax.naming.Context#INITIAL_CONTEXT_FACTORY
*/
String JNDI_CLASS ="hibernate.jndi.class";
/**
* Names the {@literal JNDI} provider/connection url
*
* @see javax.naming.Context#PROVIDER_URL
*/
String JNDI_URL ="hibernate.jndi.url";
/**
* Names a prefix used to define arbitrary {@literal JNDI} {@link javax.naming.InitialContext} properties. These
* properties are passed along to {@link javax.naming.InitialContext#InitialContext(java.util.Hashtable)}
*/
String JNDI_PREFIX = "hibernate.jndi";
/**
* Names the Hibernate {@literal SQL} {@link org.hibernate.dialect.Dialect} class
*/
String DIALECT ="hibernate.dialect";
/**
* Names any additional {@link org.hibernate.engine.jdbc.dialect.spi.DialectResolver} implementations to
* register with the standard {@link org.hibernate.engine.jdbc.dialect.spi.DialectFactory}.
*/
String DIALECT_RESOLVERS = "hibernate.dialect_resolvers";
/**
* Defines the default storage engine for the relational databases that support multiple storage engines.
* This property must be set either as an Environment variable or JVM System Property.
* That is because the Dialect is bootstrapped prior to Hibernate property resolution.
*
* @since 5.2.9
*/
String STORAGE_ENGINE = "hibernate.dialect.storage_engine";
/**
* Used to specify the {@link org.hibernate.tool.schema.spi.SchemaManagementTool} to use for performing
* schema management. The default is to use {@link org.hibernate.tool.schema.internal.HibernateSchemaManagementTool}
*
* @since 5.0
*/
String SCHEMA_MANAGEMENT_TOOL = "hibernate.schema_management_tool";
/**
* Names the implementation of {@link TransactionCoordinatorBuilder} to use for
* creating {@link TransactionCoordinator} instances.
* <p/>
* Can be<ul>
* <li>TransactionCoordinatorBuilder instance</li>
* <li>TransactionCoordinatorBuilder implementation {@link Class} reference</li>
* <li>TransactionCoordinatorBuilder implementation class name (FQN) or short-name</li>
* </ul>
*
* @since 5.0
*/
String TRANSACTION_COORDINATOR_STRATEGY = "hibernate.transaction.coordinator_class";
/**
* Names the {@link org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform} implementation to use for integrating
* with {@literal JTA} systems. Can reference either a {@link org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform}
* instance or the name of the {@link org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform} implementation class
*
* @since 4.0
*/
String JTA_PLATFORM = "hibernate.transaction.jta.platform";
/**
* Should we prefer using the {@link org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform#retrieveUserTransaction}
* over using {@link org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform#retrieveTransactionManager}?
*
* Default is <code>false</code>
*
* @since 5.0
*/
String PREFER_USER_TRANSACTION = "hibernate.jta.prefer_user_transaction";
/**
* Names the {@link org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformResolver} implementation to use.
* @since 4.3
*/
String JTA_PLATFORM_RESOLVER = "hibernate.transaction.jta.platform_resolver";
/**
* A configuration value key used to indicate that it is safe to cache
* {@link javax.transaction.TransactionManager} references.
*
* @since 4.0
*/
String JTA_CACHE_TM = "hibernate.jta.cacheTransactionManager";
/**
* A configuration value key used to indicate that it is safe to cache
* {@link javax.transaction.UserTransaction} references.
*
* @since 4.0
*/
String JTA_CACHE_UT = "hibernate.jta.cacheUserTransaction";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// MetadataBuilder level settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* A default database catalog name to use for unqualified tablenames
*
* @see MetadataBuilder#applyImplicitCatalogName
*/
String DEFAULT_CATALOG = "hibernate.default_catalog";
/**
* A default database schema (owner) name to use for unqualified tablenames
*
* @see MetadataBuilder#applyImplicitSchemaName
*/
String DEFAULT_SCHEMA = "hibernate.default_schema";
/**
* Setting used to give the name of the default {@link org.hibernate.annotations.CacheConcurrencyStrategy}
* to use when either {@link javax.persistence.Cacheable @Cacheable} or
* {@link org.hibernate.annotations.Cache @Cache} is used. {@link org.hibernate.annotations.Cache @Cache(strategy="..")} is used to override.
*
* @see MetadataBuilder#applyAccessType(org.hibernate.cache.spi.access.AccessType)
*/
String DEFAULT_CACHE_CONCURRENCY_STRATEGY = "hibernate.cache.default_cache_concurrency_strategy";
/**
* Setting which indicates whether or not the new {@link org.hibernate.id.IdentifierGenerator} are used
* for AUTO, TABLE and SEQUENCE.
* <p/>
* Default is {@code true}. Existing applications may want to disable this (set it {@code false}) for
* upgrade compatibility.
*
* @see MetadataBuilder#enableNewIdentifierGeneratorSupport
*/
String USE_NEW_ID_GENERATOR_MAPPINGS = "hibernate.id.new_generator_mappings";
/**
* @see org.hibernate.boot.MetadataBuilder#enableImplicitForcingOfDiscriminatorsInSelect(boolean)
*/
String FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT = "hibernate.discriminator.force_in_select";
/**
* The legacy behavior of Hibernate is to not use discriminators for joined inheritance (Hibernate does not need
* the discriminator...). However, some JPA providers do need the discriminator for handling joined inheritance.
* In the interest of portability this capability has been added to Hibernate too.
* <p/>
* However, we want to make sure that legacy applications continue to work as well. Which puts us in a bind in
* terms of how to handle "implicit" discriminator mappings. The solution is to assume that the absence of
* discriminator metadata means to follow the legacy behavior *unless* this setting is enabled. With this setting
* enabled, Hibernate will interpret the absence of discriminator metadata as an indication to use the JPA
* defined defaults for these absent annotations.
* <p/>
* See Hibernate Jira issue HHH-6911 for additional background info.
*
* @see MetadataBuilder#enableImplicitDiscriminatorsForJoinedSubclassSupport
* @see #IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
*/
String IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS = "hibernate.discriminator.implicit_for_joined";
/**
* The legacy behavior of Hibernate is to not use discriminators for joined inheritance (Hibernate does not need
* the discriminator...). However, some JPA providers do need the discriminator for handling joined inheritance.
* In the interest of portability this capability has been added to Hibernate too.
* <p/>
* Existing applications rely (implicitly or explicitly) on Hibernate ignoring any DiscriminatorColumn declarations
* on joined inheritance hierarchies. This setting allows these applications to maintain the legacy behavior
* of DiscriminatorColumn annotations being ignored when paired with joined inheritance.
* <p/>
* See Hibernate Jira issue HHH-6911 for additional background info.
*
* @see MetadataBuilder#enableExplicitDiscriminatorsForJoinedSubclassSupport
* @see #IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
*/
String IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS = "hibernate.discriminator.ignore_explicit_for_joined";
/**
* Enable nationalized character support on all string / clob based attribute ( string, char, clob, text etc ).
*
* Default is {@code false}.
*
* @see MetadataBuilder#enableGlobalNationalizedCharacterDataSupport(boolean)
*/
String USE_NATIONALIZED_CHARACTER_DATA = "hibernate.use_nationalized_character_data";
/**
* The deprecated name. Use {@link #SCANNER} or {@link #SCANNER_ARCHIVE_INTERPRETER} instead.
*/
String SCANNER_DEPRECATED = "hibernate.ejb.resource_scanner";
/**
* Pass an implementation of {@link org.hibernate.boot.archive.scan.spi.Scanner}.
* Accepts either:<ul>
* <li>an actual instance</li>
* <li>a reference to a Class that implements Scanner</li>
* <li>a fully qualified name (String) of a Class that implements Scanner</li>
* </ul>
*
* @see org.hibernate.boot.MetadataBuilder#applyScanner
*/
String SCANNER = "hibernate.archive.scanner";
/**
* Pass {@link org.hibernate.boot.archive.spi.ArchiveDescriptorFactory} to use
* in the scanning process. Accepts either:<ul>
* <li>an ArchiveDescriptorFactory instance</li>
* <li>a reference to a Class that implements ArchiveDescriptorFactory</li>
* <li>a fully qualified name (String) of a Class that implements ArchiveDescriptorFactory</li>
* </ul>
* <p/>
* See information on {@link org.hibernate.boot.archive.scan.spi.Scanner}
* about expected constructor forms.
*
* @see #SCANNER
* @see org.hibernate.boot.archive.scan.spi.Scanner
* @see org.hibernate.boot.archive.scan.spi.AbstractScannerImpl
* @see MetadataBuilder#applyArchiveDescriptorFactory
*/
String SCANNER_ARCHIVE_INTERPRETER = "hibernate.archive.interpreter";
/**
* Identifies a comma-separate list of values indicating the types of
* things we should auto-detect during scanning. Allowable values include:<ul>
* <li>"class" - discover classes - .class files are discovered as managed classes</li>
* <li>"hbm" - discover hbm mapping files - hbm.xml files are discovered as mapping files</li>
* </ul>
*
* @see org.hibernate.boot.MetadataBuilder#applyScanOptions
*/
String SCANNER_DISCOVERY = "hibernate.archive.autodetection";
/**
* Used to specify the {@link org.hibernate.boot.model.naming.ImplicitNamingStrategy} class to use. The following
* short-names are defined for this setting:<ul>
* <li>"default" -> {@link org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl}</li>
* <li>"jpa" -> {@link org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl}</li>
* <li>"legacy-jpa" -> {@link org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl}</li>
* <li>"legacy-hbm" -> {@link org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl}</li>
* <li>"component-path" -> {@link org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl}</li>
* </ul>
*
* The default is defined by the ImplicitNamingStrategy registered under the "default" key. If that happens to
* be empty, the fallback is to use {@link org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl}.
*
* @see MetadataBuilder#applyImplicitNamingStrategy
*
* @since 5.0
*/
String IMPLICIT_NAMING_STRATEGY = "hibernate.implicit_naming_strategy";
/**
* Used to specify the {@link org.hibernate.boot.model.naming.PhysicalNamingStrategy} class to use.
*
* @see MetadataBuilder#applyPhysicalNamingStrategy
*
* @since 5.0
*/
String PHYSICAL_NAMING_STRATEGY = "hibernate.physical_naming_strategy";
/**
* Used to specify the order in which metadata sources should be processed. Value
* is a delimited-list whose elements are defined by {@link org.hibernate.cfg.MetadataSourceType}.
* <p/>
* Default is {@code "hbm,class"} which indicates to process {@code hbm.xml} files followed by
* annotations (combined with {@code orm.xml} mappings).
*
* @see MetadataBuilder#applySourceProcessOrdering(org.hibernate.cfg.MetadataSourceType...)
*/
String ARTIFACT_PROCESSING_ORDER = "hibernate.mapping.precedence";
/**
* Specifies whether to automatically quote any names that are deemed keywords. Auto-quoting
* is disabled by default. Set to true to enable it.
*
* @since 5.0
*/
String KEYWORD_AUTO_QUOTING_ENABLED = "hibernate.auto_quote_keyword";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// SessionFactoryBuilder level settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* Setting used to name the Hibernate {@link org.hibernate.SessionFactory}.
*
* Naming the SessionFactory allows for it to be properly serialized across JVMs as
* long as the same name is used on each JVM.
*
* If {@link #SESSION_FACTORY_NAME_IS_JNDI} is set to {@code true}, this is also the
* name under which the SessionFactory is bound into JNDI on startup and from which
* it can be obtained from JNDI.
*
* @see #SESSION_FACTORY_NAME_IS_JNDI
* @see org.hibernate.internal.SessionFactoryRegistry
*/
String SESSION_FACTORY_NAME = "hibernate.session_factory_name";
/**
* Does the value defined by {@link #SESSION_FACTORY_NAME} represent a JNDI namespace into which
* the {@link org.hibernate.SessionFactory} should be bound and made accessible?
*
* Defaults to {@code true} for backwards compatibility.
*
* Set this to {@code false} if naming a SessionFactory is needed for serialization purposes, but
* no writable JNDI context exists in the runtime environment or if the user simply does not want
* JNDI to be used.
*
* @see #SESSION_FACTORY_NAME
*/
String SESSION_FACTORY_NAME_IS_JNDI = "hibernate.session_factory_name_is_jndi";
/**
* Enable logging of generated SQL to the console
*/
String SHOW_SQL ="hibernate.show_sql";
/**
* Enable formatting of SQL logged to the console
*/
String FORMAT_SQL ="hibernate.format_sql";
/**
* Add comments to the generated SQL
*/
String USE_SQL_COMMENTS ="hibernate.use_sql_comments";
/**
* Maximum depth of outer join fetching
*/
String MAX_FETCH_DEPTH = "hibernate.max_fetch_depth";
/**
* The default batch size for batch fetching
*/
String DEFAULT_BATCH_FETCH_SIZE = "hibernate.default_batch_fetch_size";
/**
* Use <tt>java.io</tt> streams to read / write binary data from / to JDBC
*/
String USE_STREAMS_FOR_BINARY = "hibernate.jdbc.use_streams_for_binary";
/**
* Use JDBC scrollable <tt>ResultSet</tt>s. This property is only necessary when there is
* no <tt>ConnectionProvider</tt>, ie. the user is supplying JDBC connections.
*/
String USE_SCROLLABLE_RESULTSET = "hibernate.jdbc.use_scrollable_resultset";
/**
* Tells the JDBC driver to attempt to retrieve row Id with the JDBC 3.0 PreparedStatement.getGeneratedKeys()
* method. In general, performance will be better if this property is set to true and the underlying
* JDBC driver supports getGeneratedKeys().
*/
String USE_GET_GENERATED_KEYS = "hibernate.jdbc.use_get_generated_keys";
/**
* Gives the JDBC driver a hint as to the number of rows that should be fetched from the database
* when more rows are needed. If <tt>0</tt>, JDBC driver default settings will be used.
*/
String STATEMENT_FETCH_SIZE = "hibernate.jdbc.fetch_size";
/**
* Maximum JDBC batch size. A nonzero value enables batch updates.
*/
String STATEMENT_BATCH_SIZE = "hibernate.jdbc.batch_size";
/**
* Select a custom batcher.
*/
String BATCH_STRATEGY = "hibernate.jdbc.factory_class";
/**
* Should versioned data be included in batching?
*/
String BATCH_VERSIONED_DATA = "hibernate.jdbc.batch_versioned_data";
/**
* Default JDBC TimeZone. Unless specified, the JVM default TimeZone is going to be used by the underlying JDBC Driver.
*
* @since 5.2.3
*/
String JDBC_TIME_ZONE = "hibernate.jdbc.time_zone";
/**
* Enable automatic session close at end of transaction
*/
String AUTO_CLOSE_SESSION = "hibernate.transaction.auto_close_session";
/**
* Enable automatic flush during the JTA <tt>beforeCompletion()</tt> callback
*/
String FLUSH_BEFORE_COMPLETION = "hibernate.transaction.flush_before_completion";
/**
* Specifies how Hibernate should acquire JDBC connections. Should generally only configure
* this or {@link #RELEASE_CONNECTIONS}, not both
*
* @see org.hibernate.ConnectionAcquisitionMode
*
* @since 5.1
*
* @deprecated (since 5.2) use {@link #CONNECTION_HANDLING} instead
*/
@Deprecated
String ACQUIRE_CONNECTIONS = "hibernate.connection.acquisition_mode";
/**
* Specifies how Hibernate should release JDBC connections. Should generally only configure
* this or {@link #ACQUIRE_CONNECTIONS}, not both
*
* @see org.hibernate.ConnectionReleaseMode
*
* @deprecated (since 5.2) use {@link #CONNECTION_HANDLING} instead
*/
@Deprecated
String RELEASE_CONNECTIONS = "hibernate.connection.release_mode";
/**
* Specifies how Hibernate should manage JDBC connections in terms of acquiring and releasing.
* Supersedes {@link #ACQUIRE_CONNECTIONS} and {@link #RELEASE_CONNECTIONS}
*
* @see org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode
*
* @since 5.2
*/
String CONNECTION_HANDLING = "hibernate.connection.handling_mode";
/**
* Context scoping impl for {@link org.hibernate.SessionFactory#getCurrentSession()} processing.
*/
String CURRENT_SESSION_CONTEXT_CLASS = "hibernate.current_session_context_class";
String USE_IDENTIFIER_ROLLBACK = "hibernate.use_identifier_rollback";
/**
* Use bytecode libraries optimized property access
*/
String USE_REFLECTION_OPTIMIZER = "hibernate.bytecode.use_reflection_optimizer";
/**
* The classname of the HQL query parser factory
*/
String QUERY_TRANSLATOR = "hibernate.query.factory_class";
/**
* A comma-separated list of token substitutions to use when translating a Hibernate
* query to SQL
*/
String QUERY_SUBSTITUTIONS = "hibernate.query.substitutions";
/**
* Should named queries be checked during startup (the default is enabled).
* <p/>
* Mainly intended for test environments.
*/
String QUERY_STARTUP_CHECKING = "hibernate.query.startup_check";
/**
* Setting which indicates whether or not Java constant follow the Java Naming conventions.
* <p/>
* Default is {@code true}. Existing applications may want to disable this (set it {@code false}) if non-conventional Java constants are used.
* However, there is a significant performance overhead for using non-conventional Java constants since Hibernate cannot determine if aliases
* should be treated as Java constants or not.
*
* @since 5.2
*/
String CONVENTIONAL_JAVA_CONSTANTS = "hibernate.query.conventional_java_constants";
/**
* The {@link org.hibernate.exception.spi.SQLExceptionConverter} to use for converting SQLExceptions
* to Hibernate's JDBCException hierarchy. The default is to use the configured
* {@link org.hibernate.dialect.Dialect}'s preferred SQLExceptionConverter.
*/
String SQL_EXCEPTION_CONVERTER = "hibernate.jdbc.sql_exception_converter";
/**
* Enable wrapping of JDBC result sets in order to speed up column name lookups for
* broken JDBC drivers
*/
String WRAP_RESULT_SETS = "hibernate.jdbc.wrap_result_sets";
/**
* Enable ordering of update statements by primary key value
*/
String ORDER_UPDATES = "hibernate.order_updates";
/**
* Enable ordering of insert statements for the purpose of more efficient JDBC batching.
*/
String ORDER_INSERTS = "hibernate.order_inserts";
/**
* Default precedence of null values in {@code ORDER BY} clause. Supported options: {@code none} (default),
* {@code first}, {@code last}.
*/
String DEFAULT_NULL_ORDERING = "hibernate.order_by.default_null_ordering";
/**
* Enable fetching JDBC statement warning for logging.
*
* Values are {@code true} or {@code false} .
* Default value is {@link org.hibernate.dialect.Dialect#isJdbcLogWarningsEnabledByDefault()}
*
* @since 5.1
*/
String LOG_JDBC_WARNINGS = "hibernate.jdbc.log.warnings";
/**
* Identifies an explicit {@link org.hibernate.resource.beans.container.spi.BeanContainer}
* to be used.
*
* Note that for CDI-based containers setting this is not necessary - simply
* pass the BeanManager to use via {@link #CDI_BEAN_MANAGER} and
* optionally specify {@link #DELAY_CDI_ACCESS}. This setting is more meant to
* integrate non-CDI bean containers such as Spring.
*/
String BEAN_CONTAINER = "hibernate.resource.beans.container";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// c3p0 connection pooling specific settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* A setting prefix used to indicate settings that target the hibernate-c3p0 integration
*/
String C3P0_CONFIG_PREFIX = "hibernate.c3p0";
/**
* Maximum size of C3P0 connection pool
*/
String C3P0_MAX_SIZE = "hibernate.c3p0.max_size";
/**
* Minimum size of C3P0 connection pool
*/
String C3P0_MIN_SIZE = "hibernate.c3p0.min_size";
/**
* Maximum idle time for C3P0 connection pool
*/
String C3P0_TIMEOUT = "hibernate.c3p0.timeout";
/**
* Maximum size of C3P0 statement cache
*/
String C3P0_MAX_STATEMENTS = "hibernate.c3p0.max_statements";
/**
* Number of connections acquired when pool is exhausted
*/
String C3P0_ACQUIRE_INCREMENT = "hibernate.c3p0.acquire_increment";
/**
* Idle time before a C3P0 pooled connection is validated
*/
String C3P0_IDLE_TEST_PERIOD = "hibernate.c3p0.idle_test_period";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// proxool connection pooling specific settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* A setting prefix used to indicate settings that target the hibernate-proxool integration
*/
String PROXOOL_CONFIG_PREFIX = "hibernate.proxool";
/**
* Proxool/Hibernate property prefix
* @deprecated Use {@link #PROXOOL_CONFIG_PREFIX} instead
*/
@Deprecated
String PROXOOL_PREFIX = PROXOOL_CONFIG_PREFIX;
/**
* Proxool property to configure the Proxool Provider using an XML (<tt>/path/to/file.xml</tt>)
*/
String PROXOOL_XML = "hibernate.proxool.xml";
/**
* Proxool property to configure the Proxool Provider using a properties file (<tt>/path/to/proxool.properties</tt>)
*/
String PROXOOL_PROPERTIES = "hibernate.proxool.properties";
/**
* Proxool property to configure the Proxool Provider from an already existing pool (<tt>true</tt> / <tt>false</tt>)
*/
String PROXOOL_EXISTING_POOL = "hibernate.proxool.existing_pool";
/**
* Proxool property with the Proxool pool alias to use
* (Required for <tt>PROXOOL_EXISTING_POOL</tt>, <tt>PROXOOL_PROPERTIES</tt>, or
* <tt>PROXOOL_XML</tt>)
*/
String PROXOOL_POOL_ALIAS = "hibernate.proxool.pool_alias";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Second-level cache settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* The {@link org.hibernate.cache.spi.RegionFactory} implementation. Can refer to:<ul>
* <li>an Object implementing {@link org.hibernate.cache.spi.RegionFactory}</li>
* <li>a Class implementing {@link org.hibernate.cache.spi.RegionFactory}</li>
* <li>FQN of a Class implementing {@link org.hibernate.cache.spi.RegionFactory}</li>
* </ul>
*/
String CACHE_REGION_FACTORY = "hibernate.cache.region.factory_class";
/**
* Allow control to specify the {@link org.hibernate.cache.spi.CacheKeysFactory} impl to use.
* Can refer to:<ul>
* <li>an Object implementing {@link org.hibernate.cache.spi.CacheKeysFactory}</li>